package com.pengshun.modules.api.transport.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.pengshun.modules.api.coal.validator.*;
import com.pengshun.modules.domain.FreightSettlementPhoto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Max;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;


/**
 * @author Administrator
 */
@Data
public class FreightSettlementDto implements Serializable {

    @NotNull(message = "freightSettlementId不能为空", groups = {Fourth.class, Third.class, Fifth.class})
    private Long freightSettlementId;

    @ApiModelProperty(value = "油卡比")
    @NotNull(message = "油卡比不能为空", groups = {Fifth.class})
    private Integer oilProportion;

    @NotNull(message = "现金比不能为空", groups = {Fifth.class})
    @ApiModelProperty(value = "现金比")
    private Integer cashProportion;

    @NotNull(message = "现金费用不能为空", groups = {Fifth.class})
    private BigDecimal  cashFee;
    @NotNull(message = "油卡不能为空", groups = {Fifth.class})
    private BigDecimal  oilCardFee;

    private String settlementNo;
    @NotNull(message = "transportTakeCarriageId不能为空", groups = {Second.class})
    private Long transportTakeCarriageId;
    private Long transportId;
    private Long merchantId;
    private Long orderId;
    private Long applyUserId;
    private Long gatheringUserId;
    private Long payUserId;
    private Long userId;
    private String transportTakeNo;
    @NotNull(message = "settlementAmount不能为空", groups = {First.class})
    private BigDecimal settlementAmount;
    @NotNull(message = "mineSendNum不能为空", groups = {First.class})
    @Max(value = 500,message = "矿发吨位不能超过500顿", groups = {First.class})
    private BigDecimal mineSendNum;
    private BigDecimal takeNum;

    @NotNull(message = "realNum不能为空", groups = {First.class})
    @Max(value = 500,message = "实收吨位不能超过500顿", groups = {First.class})
    private BigDecimal realNum;
    @NotNull(message = "diffNum不能为空", groups = {First.class})
    private BigDecimal diffNum;
    private BigDecimal diffPrice;
    private BigDecimal price;
    private BigDecimal freight;
    private BigDecimal loadFee;
    private BigDecimal unloadFee;
    private BigDecimal poundsFee;
    private BigDecimal otherFee;
    @Length(max = 50,message = "备注最多50字", groups = {First.class})
    private String remark;
    //** 1待结算2退回3已结算  */
    private Integer status;
    //** 1，平台结算，2，运输公司结算，3，商户结算  */
    private Integer settlementType;
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm")
    private Date applyDate;
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm")
    private Date cleanDate;
    private Date cancleTime;
    private Date backTime;
    private Date deleteTime;
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm")
    private Date rejectTime;
    private String casue;
    private String merchantName;
    private String isAbnormal;
    private String abnormalStatus;
    private String applyUserName;
    private String applyUserPhone;
    private String startAddress;
    private String endAddress;
    @NotNull(message = "urls不能为空", groups = {First.class})
    private String urls;
    @NotNull(message = "payWay不能为空", groups = {Third.class})
    private Integer payWay;
    private String payPass;
    List<FreightSettlementPhoto> photos;
}


